import request from '@/utils/request'

// 查询预约记录列表
export function listAppoint_record(query) {
    return request({
        url: '/pv/appoint_record/list',
        method: 'get',
        params: query
    })
}

// 查询预约记录详细
export function getAppoint_record(id) {
    return request({
        url: '/pv/appoint_record/' + id,
        method: 'get'
    })
}

// 查询预约记录时间段列表
// 查询预约记录时间段列表
export function getAppoint_record_time_list(appointId, id) {
  return request({
    url: `/pv/appoint_record/getAppoint_record_time_list/${appointId}/${id}`,
    method: 'get'
  })
}

// 查询未预约的学员
export function get_not_appoint_list(id) {
  return request({
    url: '/pv/appoint_record/not-appoint/' + id,
    method: 'get'
  })
}

// 新增预约记录
export function addAppoint_record(data) {
    return request({
        url: '/pv/appoint_record',
        method: 'post',
        data: data
    })
}

// 修改预约记录
export function updateAppoint_record(data) {
    return request({
        url: '/pv/appoint_record',
        method: 'put',
        data: data
    })
}

// 补约记录
export function updateAppoint_buyuerecord(data) {
  return request({
    url: '/pv/appoint_record/updateAppoint_buyuerecord',
    method: 'post',
    data: data
  })
}

// 删除预约记录
export function delAppoint_record(id) {
    return request({
        url: '/pv/appoint_record/' + id,
        method: 'delete'
    })
}
